from peewee import MySQLDatabase, CharField, DateField, IntegerField, FloatField, BooleanField
from playhouse.signals import Model

from db.peeweedb import db_connect


class Journal(Model):
    id = IntegerField(verbose_name="编号")
    name = CharField(verbose_name="名称", max_length=255)
    keyword = CharField(verbose_name="关键字", max_length=255)
    score = FloatField(verbose_name="评分")
    issn = CharField(verbose_name="ISSN", max_length=255)
    e_issn = CharField(verbose_name="E-ISSN", max_length=255)
    new_if = CharField(verbose_name="最新IF", max_length=255)
    introduce = CharField(verbose_name="期刊简介", max_length=255)
    link = CharField(verbose_name="来源链接", max_length=255)
    direction = CharField(verbose_name="研究方向", max_length=255)
    is_delete = BooleanField(verbose_name="软删除")

    class Meta:
        database = db_connect
        table_name = 'journal'
